package com.example.demo8.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo8.mapper.UserMapper;
import com.example.demo8.po.User;
import com.example.demo8.service.UserService;
import org.springframework.stereotype.Service;

/**
 * @author 20556
 * @description 针对表【tb_user】的数据库操作Service实现
 * @createDate 2024-05-02 16:44:19
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
        implements UserService {

    @Override
    public User getByUsername(String username) {
        return baseMapper.selectOne(new LambdaQueryWrapper<User>()
                .eq(User::getUsername, username));
    }
}




